Skip to content

feat(api): create analysis runs via loopback CLI - #385

Draft
seonghobae wants to merge 1 commit into
feat/analysis-run-cancel-cli-gap-003afrom
feat/analysis-run-create-cli-gap-003a
Draft

feat(api): create analysis runs via loopback CLI#385
seonghobae wants to merge 1 commit into
feat/analysis-run-cancel-cli-gap-003afrom
feat/analysis-run-create-cli-gap-003a

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Why

GAP-003A / issue #166 still required operators to write raw HTTP/1.1 after create POST. Operators cannot submit metric-free analysis runs from a client without guessing framing. Create CLI stdout stays metric-free 202 Accepted. tepp.scientific_acceptance.v1 never appears.

Live slices that this PR does not duplicate:

What

Tenth GAP-003A slice stacked on #378 over collection CLI #371 / collection GET #368 / cancel HTTP #361 / protected main 1bc02f580cf48e1d39da239f0e818453437c31c3:

  • tepp-analysis-runs create client of POST /v1/analysis-runs
  • metric-free accepted receipt: run_id, run_state=accepted, idempotency_key
  • accepted create and idempotent replay; another consumer cannot collide with the first consumer's idempotency key
  • tepp.scientific_acceptance.v1 never prints
  • empty stdin is refused; typed create JSON must match --idempotency-key
  • loopback-only; unpublished consumers, credential flags, collection pagination flags, cancel --run-id, metric stdin, and unknown verbs fail closed
  • ADR 0034 (0026–0033 live on other GAP-003A PRs)

Not an ADR 0014 scientific claim. Not persistence. Not GET-by-id. Not lifecycle POST. Not cancel HTTP. Not scientific-acceptance CLI. Not collection list. Not cancel CLI.

Verification

  • cargo clippy -p tepp_api --all-targets -- -D warnings
  • cargo test -p tepp_api --lib
  • cargo test -p tepp_api --test analysis_run_create_cli_contract
  • RUSTDOCFLAGS='-D warnings' cargo doc -p tepp_api --no-deps
  • python3 scripts/validate_documentation.py
  • python3 scripts/check_docstrings.py

Exact head: 58a9644105044edd573eb4d314db926d4576b40c

Do not merge without two independent APPROVE reviews on this exact head and current Checks. Author COMMENTED is not independent APPROVE.

GAP-003A / issue #166: operators can submit metric-free analysis runs
through `tepp-analysis-runs create` without writing raw HTTP. Stdout stays
metric-free 202 Accepted; tepp.scientific_acceptance.v1 never appears.
Stacked on cancel CLI (#378). Does not duplicate GET-by-id, lifecycle POST,
cancel HTTP, scientific-acceptance CLI, collection list, or cancel CLI.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

Hour-22 exact-head: 58a9644105044edd573eb4d314db926d4576b40c. GAP-003A create CLI tepp-analysis-runs create stacked on #378. Metric-free 202 Accepted; tepp.scientific_acceptance.v1 never appears. Devin/CodeRabbit/author COMMENTED is not independent APPROVE. Ruleset 18156473 needs two independent APPROVE reviews. No self-approve.

This was referenced Aug 31, 2026

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact-head COMMENT on 58a9644 (draft). Unique occupied: tepp-analysis-runs create POST /v1/analysis-runs. Stdout stays metric-free 202 Accepted. tepp.scientific_acceptance.v1 never appears. Do not duplicate GET-by-id / lifecycle / cancel / collection / retry / stored-request surfaces. Do not un-draft. Zero reviews on this SHA before this COMMENT. Never self-approve. Persistence remains GAP-003B. Do not weaken fail-closed. No Buyer language.

seonghobae commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@opencode-agent repair/investigate exact-head 58a9644105044edd573eb4d314db926d4576b40c using the repository's existing ContextualWisdomLab/contextual-orchestrator integration with orchestrator/free only. RCA first, with an important stale-evidence guard: run 33398655519 is now run_attempt=2, but its attempt-2 branch job record 100241493890 has created_at=2026-09-02T12:09:29Z while every started_at/completed_at step timestamp is still the 2026-08-31 attempt-1 execution, and the only branch diagnostic artifact is the expired 2026-08-31 artifact. Attempt 1 used branch job 99509277109; attempt 2 currently has line-coverage job 100241444533 genuinely queued with 2026-09-02 timestamps. Therefore do NOT call 100241493890 a fresh attempt-2 reproduction unless authoritative logs/new artifact prove it actually executed; distinguish copied/stale predecessor job evidence from fresh execution. Historical evidence still establishes that on attempt 1 branch generation succeeded and Enforce complete branch coverage failed, while fmt/check/clippy/nextest/doctest/rustdoc/cargo-deny, live PostgreSQL, and repository/Python coverage succeeded. Obtain fresh authoritative branch evidence (or reproduce the exact pinned command cargo +nightly-2026-08-21 llvm-cov --branch --workspace --all-features --json ... then python3 scripts/check_coverage.py ... --kind branches) before changing source. If authored behavior is genuinely uncovered, add the smallest realistic Rust RED test exercising the missing outcome; do not lower the 100% branch gate, add exclusions, shrink scenarios, or alter instrumentation merely to pass. If the verifier is wrong, add a focused RED regression before fixing the canonical verifier. Preserve this draft PR's metric-free create-CLI contract and stack on #378; no force push/rebase, merge, self-approval, or status fabrication. Re-fetch the branch head immediately before any write and preserve concurrent commits. Run focused tests and exact branch coverage, with PYTHONPATH=. where Python tooling requires it. Record material RCA/fix/exact verification in docs/product-technical-gap-baseline.md and relevant doctoring/CHANGELOG if those files exist. After a real source/test cause change, rely only on fresh exact-current-head Checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant